//
//  SYCourseTableViewCell.m
//  BSHOUYIFANG
//
//  Created by 曹雁彬 on 15/8/19.
//  Copyright (c) 2015年 CYB. All rights reserved.
//

#import "SYCourseTableViewCell.h"
#import "Header.h"
#import <UIImageView+WebCache.h>
@implementation SYCourseTableViewCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
      self.contentView.backgroundColor =kMColor(240, 240, 240, 0.8);
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        _bv =[[UIView alloc]initWithFrame:CGRectMake(10, 10, SCREEN_WIDTH-20, (SCREEN_HEIGHT-113)/2+10)];
        _bv.layer.cornerRadius = 5;
        _bv.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:_bv];
        
        _topImageView = [[UIImageView alloc]initWithFrame:CGRectMake(10, 10, SCREEN_WIDTH-40, (SCREEN_HEIGHT-113)/2-10)];
        [_bv addSubview:_topImageView];
       
        
        _footLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, _topImageView.frame.size.height-25, SCREEN_WIDTH-40, 25)];
        _footLabel.backgroundColor = kMColor(245, 245, 245,0.5);
        [_topImageView addSubview:_footLabel];
    }return self;
}

-(void)setModel:(SYThirdModel *)model
{
    _model = model;
    [_topImageView sd_setImageWithURL:[NSURL URLWithString:_model.img[0]]];
    _footLabel.text = _model.title;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
